module.exports = {
    lintOnSave: 'warning',
    configureWebpack: {
        module: {
            rules: [
            {
                test: /\.m?jsx?$/,
                include: /migrate-react/,
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: ['@babel/preset-react'],
                        plugins: [[
                            'import', {
                                libraryName: 'antd',
                                style: true
                            }
                        ]]
                    }
                }
            },
            {
                test: /\.js/,
                exclude: /migrate-react|node_modules/,
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: ['@vue/cli-plugin-babel/preset']
                    }
                }
            }]
        }
    },
    devServer: {
        proxy: {
            // '/api/resources/': {
            //     target: 'http://x23178478p.iok.la:8088',
            //     changeOrigin: true,
            //     pathRewrite: {
            //         '^/api': ''
            //     }
            // },
            /*     '/api/bpm': {
                     target: 'http://localhost:8077/',
                     pathRewrite: {
                         '/api': '/'

                         
                         192.168.199.100:8066
                     }
                 },*/
            /*'/api/biz': {
                target: 'http://10.99.12.70:8074',
                pathRewrite: {'^/api': '/'}
            },*/
        //     '/api/MES': {
        //         target: 'http://192.168.30.11:7071',
        //         changeOrigin: true,
        //         pathRewrite: {'^/api': ''}
        //     },
        //     // '/api/pdm': {
        //     //     target: 'http://192.168.30.32:8075',
        //     //     changeOrigin: true,
        //     //     pathRewrite: {'^/api': ''}
        //     // },
        //    '/api/pms': {
        //         target: 'http://192.168.30.11:8075',
        //         changeOrigin: true,
        //         pathRewrite: {'^/api': ''}
        //     },
            '/api': {
                target: 'http://192.168.30.11:7071',
                changeOrigin: false,
                pathRewrite: {'^/api': ''}
            }
            /*'/api': {
                target: 'http://192.168.1.10:7071',
                changeOrigin: false,
                pathRewrite: {'^/api': ''}
            },
            '/api/pms': {
                target: 'http://192.168.1.88:8075',
                changeOrigin: true,
                pathRewrite: {'^/api': ''}
            }*/
            /*'/api': {
                target: 'http://x23178478p.iok.la:5555',
                changeOrigin: false,
                pathRewrite: {'^/api': ''}
            }*/
            /*,
          '/ms': {
              target: 'https://www.easy-mock.com/mock/592501a391470c0ac1fab128',
              changeOrigin: true
          }*/
        }
    },
    css: {
        loaderOptions: {
            less: {
                lessOptions: {
                /**less-loader 配置 */
                    noIeCompat: true,
                    javascriptEnabled: true,
                }
            }
        }
    }
}
